
#切片 Slice

names=['huangxl','gouyd','rem','iris']

print(names[0:3])

print(names[:3])#

print(names[-2:])

print(names[-2:-1])

print(names[:3:2])

print(names[::3])

#tuple 和string 都能切片
m_name='huangxiaoli'

print(m_name[0:5])

